{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
    <div class="main">
        <!-- left side start-->
        {include admin.inc.menu}
        <!-- left side end-->


        <!-- main content start-->
        <section class="right-section" id="right-section">
            <!-- start of inner-frame -->
            <div class="inner-iframe">

                <!-- page breadcrumb start-->
                {include admin.inc.bread}
                <!-- page "breadcrumb end-->
                <!-- Nav tabs -->
                <ul class="nav nav-tabs">

                    <li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加仓库</a></li>
                    <li class="active">
                        <a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i>仓库列表</a>
                    </li>

                </ul>

                <div class="inner-container">

                    <form id="J_List_Form">
                        {run exportBtn()}
                        <div class="table-responsive">
                            <table id="J_ListTable" class="table  table-hover  table-striped">
                                <!--tmpl-listtable-->

                                <!-- listblock -->
                                <thead>
                                <tr>
                                    <th width="20"><input type="checkbox" class="icheck check-all"/></th>
                                    <!--tmpl-fieldheaders-->

                                    <th>仓库名称
                                    </th>
                                    <th>仓库面积(㎡)
                                    </th>
                                    <th>性质
                                    </th>
                                    <th>联系人
                                    </th>
                                    <th>联系电话
                                    </th>
                                    <th>仓库地址
                                    </th>
                                    <th>添加时间
                                    </th>
                                    <th>添加人
                                    </th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {if empty($items)}
                                <tr>
                                    <td style="text-align:center;" colspan="8" class="empty-table-td">{$emptyRecord}
                                    </td>
                                </tr>
                                {/if}
                                {loop $items $value}
                                <tr data-id="{$value[id]}">
                                    <td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
                                    <!--tmpl-fieldlist-->

                                    <td>{$value[name]}</td>
                                    <td>{$value[area]}</td>
                                    <td>{$value[type]}</td>
                                    <td>{$value[contact]}</td>
                                    <td>{$value[contact_mobile]}</td>
                                    <td>{$value[address]}</td>
                                    <td>{$value[addtime]}</td>
                                    <td>{$value[manager_name]}</td>

                                    <td>
                                        {if in_case_array('admin/repertory/edit',$priv) || empty($priv)}

                                        <a href="{$edit_url}?id={$value[id]}" class="btn btn-primary btn-xs">
                                            <i class="glyphicon glyphicon-edit"></i> 编辑</a>
                                        {/if}
                                        {if in_case_array('admin/repertory/delete',$priv) || empty($priv)}

                                        <a href="{$delete_url}?id={$value[id]}"
                                           class="btn btn-danger btn-xs item-remove">
                                            <i class="glyphicon glyphicon-trash"></i> 删除</a>
                                        {/if}


                                    </td>
                                </tr>
                                {/loop}


                            </table>

                        </div>

                    </form>
                    <div class="text-right" style="float: right">
                        {$pagemenu}
                    </div>


                </div>
            </div>
        </section>
    </div>
</div>

<!--footer section start-->
{include admin.inc.footer}
<!--footer section end-->

<!--tmpl-script-->



<!-- pagescript -->
<script type="text/javascript">
    seajs.use("admin/repertoryindex", function (parameter) {

        /**--tmpl-templatejavascript--**/

        <!--tmpl-templatejavascript-->
        parameter.detailUrl = "{$detail_url}";
        parameter.doDeleteUrl = "{$do_delete_url}";
        parameter.editUrl = "{$do_edit_url}";

        parameter.image_search_url = "{$image_search_url}";
        parameter.image_list_url = "{$image_list_url}";

        parameter.init();
    });
</script>


<script id="assocpage" type="text/html">
    <div class="text-right">
        <ul class="pagination blog-pagination">
            <li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li>
            {[loop pages page]}

            <li {[if curr== page]}class="active" {[
            /if]}><a class="assoc-page" data-page="{[page]}" href="javascript:void(0)">{[page]}</a></li>

            {[/loop]}
            <li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li>
        </ul>
    </div>
</script>
</body>
</html>
